package com.fsnbigdata.domain;

import org.hibernate.validator.constraints.Length;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author: chen quan zhou
 * @Date: Created in 18:56 2018/9/29
 * @Modified By:
 *
 * 专家咨询实体
 */

@Entity
public class ZhExpert {
    
    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    
    /**
     * 类型
     */
    private Integer type;
    
    /**
     * 姓名
     */
    @NotNull
    @Length(min=1,max=255,message="专家姓名长度必须在1-255之间")
    private String name;
    
    /**
     * 头像
     */
    @Length(min=0,max=255,message="专家头像长度必须在1-255之间")
    private String avatar;
    
    /**
     * 职务
     */
    @Length(min=0,max=255,message="专家职务长度必须在1-255之间")
    private String position;
    
    /**
     * 所属机构
     */
    @Length(min=0,max=255,message="专家所属机构长度必须在0-255之间")
    private String company;
    
    /**
     * 简介
     */
    private String content;

    @Length(min=0,max=255,message="专家创建者长度必须在0-255之间")
    private String creator;
    
    /**
     * 添加时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    private Date add_time;
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Integer getType() {
        return type;
    }
    
    public void setType(Integer type) {
        this.type = type;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getAvatar() {
        return avatar;
    }
    
    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
    
    public String getPosition() {
        return position;
    }
    
    public void setPosition(String position) {
        this.position = position;
    }
    
    public String getCompany() {
        return company;
    }
    
    public void setCompany(String company) {
        this.company = company;
    }
    
    public String getContent() {
        return content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    
    public Date getAdd_time() {
        return add_time;
    }
    
    public void setAdd_time(Date add_time) {
        this.add_time = add_time;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
}
